package models;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author eagle
 */
@Entity
@Table(name = "AULA", catalog = "sischool2", schema = "")
@NamedQueries({
    @NamedQuery(name = "Aula.findAll", query = "SELECT a FROM Aula a"),
    @NamedQuery(name = "Aula.findByIdAula", query = "SELECT a FROM Aula a WHERE a.idAula = :idAula"),
    @NamedQuery(name = "Aula.findByNombreAula", query = "SELECT a FROM Aula a WHERE a.nombreAula = :nombreAula"),
    @NamedQuery(name = "Aula.findByCapacidadaula", query = "SELECT a FROM Aula a WHERE a.capacidadaula = :capacidadaula"),
    @NamedQuery(name = "Aula.findByDisponibleAula", query = "SELECT a FROM Aula a WHERE a.disponibleAula = :disponibleAula")})
public class Aula implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idAula", nullable = false)
    private Integer idAula;
    @Column(name = "nombreAula", length = 45)
    private String nombreAula;
    @Column(name = "capacidadaula")
    private Integer capacidadaula;
    @Column(name = "disponibleAula")
    private Boolean disponibleAula;
    @OneToMany(mappedBy = "aulaId")
    private List<Curso> cursoList;

    public Aula() {
    }

    public Aula(Integer idAula) {
        this.idAula = idAula;
    }

    public Integer getIdAula() {
        return idAula;
    }

    public void setIdAula(Integer idAula) {
        this.idAula = idAula;
    }

    public String getNombreAula() {
        return nombreAula;
    }

    public void setNombreAula(String nombreAula) {
        this.nombreAula = nombreAula;
    }

    public Integer getCapacidadaula() {
        return capacidadaula;
    }

    public void setCapacidadaula(Integer capacidadaula) {
        this.capacidadaula = capacidadaula;
    }

    public Boolean getDisponibleAula() {
        return disponibleAula;
    }

    public void setDisponibleAula(Boolean disponibleAula) {
        this.disponibleAula = disponibleAula;
    }

    public List<Curso> getCursoList() {
        return cursoList;
    }

    public void setCursoList(List<Curso> cursoList) {
        this.cursoList = cursoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idAula != null ? idAula.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Aula)) {
            return false;
        }
        Aula other = (Aula) object;
        if ((this.idAula == null && other.idAula != null) || (this.idAula != null && !this.idAula.equals(other.idAula))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "models.Aula[idAula=" + idAula + "]";
    }

}
